package com.maozw.feign.controller;

import com.maozw.feign.domain.Movie;
import com.maozw.feign.server.MovieFeignClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 *
 * @author MAOZW
 * @Description: ${FeignController}
 * @date 2018/8/9 11:24
 */
@RestController
public class FeignController {
    @Autowired
    private MovieFeignClient movieFeignClient;

    @GetMapping("/{id}")
    public Movie findByIdFeign(@PathVariable Long id){
        Movie user = this.movieFeignClient.findByIdFeign(id);
        return user;
    }
}
